package p.ithorns.integration.transform.enums;


import p.ithorns.tools.translator.annotation.IDict;

/**
 * OrderType
 *
 * @author Ht.L
 * @version 1.0.0
 * @date 2023/4/5 19:15
 */
public enum OrderType implements IDict<Integer> {

    CLOTH(1, "服饰"),

    BOOK(2, "书籍"),

    FOOD(3, "食品"),
    ;

    private int type;

    private String name;

    OrderType(int type, String name) {
        this.type = type;
        this.name = name;
        init(type, name);
    }

    public int getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public static OrderType random() {
        return values()[(int) (Math.random() * values().length)];
    }

    @Override
    public Integer getCode() {
        return type;
    }

    @Override
    public String getText() {
        return name;
    }

}